<template>
  <div class="child-wrapper">
    <div><span>子文件数据：</span>
      {{infoObj.name}}
      {{infoObj.age}}
      {{infoObj}}
    </div>

    <el-button @click="handleUpdataClick">子文件更新数据</el-button>
  </div>
</template>

<script>
  export default {
    name: 'Children',

    mounted() {
      console.log('##: this is child mounted function')
    },

    props:{
      infoObj: {
        type: Object,
        required: false,
        default: 'hellow'
      }
    },

    data() {
      return {

      }
    },

    methods: {
      handleUpdataClick() {
        this.$emit('colectData', '新的数据')
      }
    }
  }
</script>

<style scoped lang="stylus">

</style>